<template>
  <div class="app-container">
    <el-card shadow="never" class="mb-3">
      <el-form :inline="true" class="mt-2.5" label-width="auto">
        <!-- <el-form-item prop="username" label="发货清单"> 2532234 </el-form-item> -->
        <el-form-item prop="username" label="内向交货单号"> 4358923 </el-form-item>
        <!-- <br> -->
        <el-form-item prop="username" label="供方名称"> 无锡工业自动化贸易公司 </el-form-item>
        <el-form-item prop="username" label="发货地点"> 无锡 </el-form-item>
        <el-form-item prop="username" label="发货时间"> 2024-04-04 07:28:35 </el-form-item>
        <el-form-item prop="username" label="送达日期"> 2024-04-06 </el-form-item>
        <el-form-item prop="username" label="发货人"> 张三 </el-form-item>
        <!-- <el-form-item prop="username" label="转送至"> 长兴 </el-form-item>
        <el-form-item prop="username" label="经总司"> 中转 </el-form-item>
        <el-form-item prop="username" label="基地"> 标准件仓库 </el-form-item> -->
        <el-form-item prop="username" label="备注"> </el-form-item>
        <!-- <el-form-item prop="username" v-for="(item, index) in s1" :key="index" :label="item">
          <el-input placeholder="请选择" />
        </el-form-item> -->
        <!-- <el-form-item>
          <el-button type="primary">查询</el-button>
          <el-button>重置</el-button>
        </el-form-item> -->
      </el-form>
    </el-card>
    <el-card shadow="never" class="">
      <div class="toolbar-wrapper mb-3">
        <el-button type="primary">批量添加库位</el-button>
        <el-button type="primary" @click="dialogVisible = true">入库</el-button>
      </div>
      <el-table :data="tableData">
        <el-table-column type="selection" width="50" align="center" />
        <el-table-column type="index" label="序" width="50" />
        <el-table-column v-for="(item, index) in s2" :key="index" :label="item" :prop="'name' + index" />
        <el-table-column label="发货数量">
          <el-input v-model="num" placeholder="请输入" />
        </el-table-column>
        <!-- <el-table-column label="件数">
          <el-input v-model="num" placeholder="请输入" />
        </el-table-column> -->
        <el-table-column label="库位">
          <el-input placeholder="请输入" />
        </el-table-column>
        <el-table-column v-for="(item, index) in s3" :key="index" :label="item" :prop="'name' + (index + 4)" />
        <el-table-column label="备注">
          <el-input placeholder="请输入" />
        </el-table-column>

        <!-- <el-table-column fixed="right" label="操作" align="center">
          <el-button type="primary" text bg size="small">详情</el-button>
        </el-table-column> -->
      </el-table>
    </el-card>
    <el-dialog v-model="dialogVisible" title="选择入库" width="30%">
      <el-form ref="formRef" :rules="formRules" label-width="auto">
        <el-form-item prop="username" label="仓库">
          <el-input model-value="1#库 标准件" placeholder="请选择" />
        </el-form-item>
      </el-form>
      <template #footer>
        <el-button @click="dialogVisible = false">取消</el-button>
        <el-button type="primary">确认</el-button>
        <!-- <el-button type="primary" @click="$router.push('/labels/shippingrk')">确认</el-button> -->
      </template>
    </el-dialog>
  </div>
</template>
<script setup>
import { ref } from "vue"

const s1 = [
  // "标准/型号",
  // "规格",
  // "材质",
  // "单位",
  // "件数",
  // "采购说明",
  "产品工号",
  "产品名称",
  "图号",
  "发货数量",
  "发货地点",
  "发货人",
  "收货地点",
  "收货人",
  "备注"
  // "申购部门",
  // "类别号",
  // "物资编码",
  // "寄售",
]
const s2 = [
  // "产品名称", "标准/型号", "规格", "材质", "单位"
  "产品工号",
  "产品名称",
  "物料名称",
  "图号",
]
const num = 5
const s3 = [
  // "采购说明", "产品工号", "清单编号", "申购人", "申购部门", "类别号", "ABC分类", "检验状态", "物资编码", "寄售"
  "发货地点",
  "发货人",
  "收货地点",
  "收货人",
]
const formRules = {
  username: [{ required: true, trigger: "blur", message: "请输入" }]
}
const dialogVisible = ref(false)
const tableData = []
for (let index = 0; index < 10; index++) {
  tableData.push({
    name0: "1002001090",
    name1: "青岛桥吊",
    name2: "司机室",
    name3: "",
    name4: "上海港机重工",
    name5: "张三",
    name6: "振华长兴",
    name7: "李四",
    // name8: "13794833",
    // name9: "",
    // name10: "张三",
    // name11: "",
    // name12: "234324",
    // name13: "",
    // name14: "",
    // name15: "2345",
    // name16: "",
    // name17: ""
  })
}
</script>
<style lang="scss" scoped></style>
